<template>
  <el-container>
    <el-aside  width="auto" class="header-logo tap" >
<!--      <img class="logo" src="@/assets/image/logo-jiao.png" alt="Logo"/>-->
      <span>河师大求职招聘系统</span>
    </el-aside>
    <el-aside width="auto" class="header-logo tap" >
      <el-avatar icon="el-icon-user-solid" class="headerLogo"></el-avatar>
      <el-button @click="exit" >退出</el-button>
    </el-aside>
  </el-container>
</template>

<script>
  export default {
    name: "nav-top",
    data() {
      return {
        activeIndex: "1",
      };
    },
    methods: {
      handleSelect(key, keyPath) {
        console.log(key, keyPath);
      },
      exit(){
        //退出登录，清空token
        localStorage.removeItem('Authorization');
        this.$store.state.status=false;
        console.log(this.$store.state.status)
        this.$router.push('/login');
      },
    }
  };
</script>

<style scoped>
  .el-aside {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  section{
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
  }

  .logo {
    width: 200px;
  }

  .headerLogo,.logo{
    cursor: pointer;
  }

  .{
    background-color: dimgrey;
  }

</style>
